﻿/// <summary>
/// The exceptions that is thrown when the used ObjectContext is not an instance of
/// ActualModelEntities.
/// </summary>
[System.Serializable]
public class InvalidContextException : System.Exception
{
    public InvalidContextException() { }
    public InvalidContextException(string message) : base(message) { }
    public InvalidContextException(string message, System.Exception inner) : base(message, inner) { }
    protected InvalidContextException(
      System.Runtime.Serialization.SerializationInfo info,
      System.Runtime.Serialization.StreamingContext context)
        : base(info, context) { }
}

/// <summary>
/// The exception that is thrown when an entity object is already added to the context,
/// or a base entity already exists in the context with the key of the object.
/// </summary>
[System.Serializable]
public class ObjectAlreadyAddedException : System.Exception
{
    public ObjectAlreadyAddedException() { }
    public ObjectAlreadyAddedException(string message) : base(message) { }
    public ObjectAlreadyAddedException(string message, System.Exception inner) : base(message, inner) { }
    protected ObjectAlreadyAddedException(
      System.Runtime.Serialization.SerializationInfo info,
      System.Runtime.Serialization.StreamingContext context)
        : base(info, context) { }
}